package com.pig4cloud.pig.ds.biz_a;

import cn.hutool.core.util.StrUtil;
import com.pig4cloud.pig.common.biz.domain.biza.req.ACreateCommand;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 * @Description : 业务A参数校验逻辑
 * @author: lingnan
 * @date: 2023/6/19
 * @version: 1.0
 */
@Slf4j
@Service
public class BizAParamCheckChainHandler extends AbstractBizAChainHandler<ACreateCommand> {

    /**
     * 业务处理方法
     *
     * @param param
     */
    @Override
    public void handler(ACreateCommand param) {
        log.info("基础业务数据校验 -> {}", param.toString());
		Assert.isTrue(param.getAc2() != null && StrUtil.isNotBlank(param.getAc2().getCode()),"code不能为空!");
    }

    @Override
    public int getOrder() {
        return 0;
    }
}
